<?php 
//连接数据库
$id = $_GET['id'];
echo $id;
require('../query_db.php');
//删除数据
$sql = "DELETE FROM user_info WHERE user_name='$id'";
if(mysqli_query($conn,$sql)){
    echo "<script>alert('删除成功');location.href='admin_index.php';</script>";
}else{
    echo "<script>alert('删除失败');location.href='admin_index.php';</script>";
    echo mysqli_error($conn);
}
//关闭数据库连接
mysqli_close($conn);
?>